/*
    Copyright 2011 - Tommi Laukkanen (www.substanceofcode.com)

    This file is part of NewsFlow.

    NewsFlow is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    NewsFlow is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with NewsFlow. If not, see <http://www.gnu.org/licenses/>.
*/

import Qt 4.7

QtObject {
    id: theme
    property string backGroundColor: "#dedfdf"
    property string textColor: "#222"
    property string menuTextColor: "#444"
    property string menuSubTextColor: "#777"
    property string menuSeparator: "#ccc"
    property string menuActiveBGColor: "#ccc"
    property string menuInactiveBGColor: "#dedfdf"
    property int menuFontSize: 20
    property int menuSubFontSize: 14

    property bool isTablet: false //false
    property int themeColor: 1

    function setTablet(tablet) {
        theme.isTablet = tablet;
    }

    function isWhite() {
        //console.log("Theme " + theme.themeColor);
        return theme.themeColor==1;
    }

    function switchTheme() {
        if(theme.themeColor==0) {
            theme.themeColor = 1;
        } else {
            theme.themeColor = 0;
        }
        setTheme(theme.themeColor);
    }

    function getTheme() {
        return theme.themeColor;
    }

    function setTheme(colorTheme) {
        theme.themeColor = colorTheme;
        if(colorTheme==0) {
            theme.menuFontSize = 22;
            theme.menuSubFontSize = 16;
            theme.backGroundColor = "#000";
            theme.textColor = "#fff";
            theme.menuTextColor = "#ddd";
            theme.menuSubTextColor = "#bbb";
            theme.menuSeparator = "#222";
            theme.menuActiveBGColor = "#484";
            theme.menuInactiveBGColor = "#050605";
        } else {
            theme.backGroundColor = "#dedfdf";
            theme.textColor = "#222";
            theme.menuTextColor = "#444";
            theme.menuSubTextColor = "#777";
            theme.menuSeparator = "#ccc";
            theme.menuActiveBGColor = "#ccc";
            theme.menuInactiveBGColor = "#dedfdf";
            theme.menuFontSize = 20;
            theme.menuSubFontSize = 14;
        }

    }

    /*
    property int menuFontSize: 22
    property int menuSubFontSize: 16
    property string backGroundColor: "#000"
    property string textColor: "#fff"
    property string menuTextColor: "#ddd"
    property string menuSubTextColor: "#bbb"
    property string menuSeparator: "#222"
    property string menuActiveBGColor: "#484"
    property string menuInactiveBGColor: "#050605"
*/

}
